* configure.in (CFLAGS): Don't set this according to the value of
authorJim Blandy <jimb@redhat.com>
Tue, 8 Jun 1993 07:18:40 +0000 (07:18 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 8 Jun 1993 07:18:40 +0000 (07:18 +0000)
the GCC shell variable.  Instead, consult the machine and system
files for the values of C_OPTIMIZE_SWITCH and C_DEBUG_SWITCH, and
test __GNUC__ while we're at it.

* configure.in: Check to see if the system has -ldnet.

configure1.in

index 1d494e24dc6f7acc38dec15add854c7542757fd7..30cfb32117009456cae4e673517a9b2c5f618aa5 100755 (executable)
@@ -921,11 +921,6 @@ case ${with_gcc} in
     ] AC_PROG_CC [
 esac
 
-CFLAGS='-g'
-if test -n "${GCC}"; then
-  CFLAGS='-g -O'
-fi
-
 #### Some other nice autoconf tests.  If you add a test here which
 #### should make an entry in src/config.h, don't forget to add an
 #### #undef clause to src/config.h.in for autoconf to modify.
@@ -942,6 +937,9 @@ AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
 AC_STDC_HEADERS
 AC_TIME_WITH_SYS_TIME
 
+dnl checks for library files
+AC_HAVE_LIBRARY(-ldnet)
+
 dnl checks for typedefs
 AC_RETSIGTYPE
 
@@ -1085,6 +1083,20 @@ echo '
 #else
 @configure@ system_malloc=no
 #endif
+
+#ifndef C_DEBUG_SWITCH
+#define C_DEBUG_SWITCH -g
+#endif
+
+#ifndef C_OPTIMIZE_SWITCH
+#define C_OPTIMIZE_SWITCH -O
+#endif
+
+#ifdef __GNUC__
+@configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
+#else
+@configure@ CFLAGS=C_DEBUG_SWITCH
+#endif
 ' > ${tempcname}
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...